//**********************************************************************************
//displayTime.java
//
//Name: Gabriel Martins	de	Castro
//Class:	COMSC	110L.51
//Date: 09/10/2014
//Instructor: Dr.	Chunyan Bai
//
//Purpose: Demonstrate basic java statements
//          print out the # of hours, minutes and seconds from given seconds
//***********************************************************************************

import java.util.Scanner;
//Class
public class displayTime
{
	public static void main(String[]	args)//main	method
	{
      //User enter # seconds
      System.out.print("Enter an integer for # of seconds: ");
      Scanner input = new Scanner(System.in);
      int seconds = input.nextInt();
      //Obtain # hours
      int hours;
      hours = seconds/3600;
      //Obtain # minutes
      int minutes;
      int remainingSeconds = seconds%3600;
      minutes = remainingSeconds/60;
      //obtain # remaining seconds
      remainingSeconds = remainingSeconds%60;
      //Display info in approprieate format
      System.out.print(hours + " hours, " + minutes + " minutes and " + remainingSeconds + " seconds.");
	}
}